﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiClipBoundary : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiClipBoundary(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiClipBoundary obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiClipBoundary()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiClipBoundary(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdGeVector3d m_vNormal
		{
			get
			{
				IntPtr intPtr = GlobalsPINVOKE.OdGiClipBoundary_m_vNormal_get(this.swigCPtr);
				OdGeVector3d result = (intPtr == IntPtr.Zero) ? null : new OdGeVector3d(intPtr, false);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGiClipBoundary_m_vNormal_set(this.swigCPtr, OdGeVector3d.getCPtr(value));
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public OdGePoint3d m_ptPoint
		{
			get
			{
				IntPtr intPtr = GlobalsPINVOKE.OdGiClipBoundary_m_ptPoint_get(this.swigCPtr);
				OdGePoint3d result = (intPtr == IntPtr.Zero) ? null : new OdGePoint3d(intPtr, false);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGiClipBoundary_m_ptPoint_set(this.swigCPtr, OdGePoint3d.getCPtr(value));
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public OdGePoint2dArray m_Points
		{
			get
			{
				IntPtr intPtr = GlobalsPINVOKE.OdGiClipBoundary_m_Points_get(this.swigCPtr);
				OdGePoint2dArray result = (intPtr == IntPtr.Zero) ? null : new OdGePoint2dArray(intPtr, false);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGiClipBoundary_m_Points_set(this.swigCPtr, OdGePoint2dArray.getCPtr(value));
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public OdGeMatrix3d m_xToClipSpace
		{
			get
			{
				IntPtr intPtr = GlobalsPINVOKE.OdGiClipBoundary_m_xToClipSpace_get(this.swigCPtr);
				OdGeMatrix3d result = (intPtr == IntPtr.Zero) ? null : new OdGeMatrix3d(intPtr, false);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGiClipBoundary_m_xToClipSpace_set(this.swigCPtr, OdGeMatrix3d.getCPtr(value));
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public OdGeMatrix3d m_xInverseBlockRefXForm
		{
			get
			{
				IntPtr intPtr = GlobalsPINVOKE.OdGiClipBoundary_m_xInverseBlockRefXForm_get(this.swigCPtr);
				OdGeMatrix3d result = (intPtr == IntPtr.Zero) ? null : new OdGeMatrix3d(intPtr, false);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGiClipBoundary_m_xInverseBlockRefXForm_set(this.swigCPtr, OdGeMatrix3d.getCPtr(value));
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public double m_dFrontClipZ
		{
			get
			{
				double result = GlobalsPINVOKE.OdGiClipBoundary_m_dFrontClipZ_get(this.swigCPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGiClipBoundary_m_dFrontClipZ_set(this.swigCPtr, value);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public double m_dBackClipZ
		{
			get
			{
				double result = GlobalsPINVOKE.OdGiClipBoundary_m_dBackClipZ_get(this.swigCPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGiClipBoundary_m_dBackClipZ_set(this.swigCPtr, value);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public bool m_bClippingFront
		{
			get
			{
				bool result = GlobalsPINVOKE.OdGiClipBoundary_m_bClippingFront_get(this.swigCPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGiClipBoundary_m_bClippingFront_set(this.swigCPtr, value);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public bool m_bDrawBoundary
		{
			get
			{
				bool result = GlobalsPINVOKE.OdGiClipBoundary_m_bDrawBoundary_get(this.swigCPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGiClipBoundary_m_bDrawBoundary_set(this.swigCPtr, value);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public bool m_bClippingBack
		{
			get
			{
				bool result = GlobalsPINVOKE.OdGiClipBoundary_m_bClippingBack_get(this.swigCPtr);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				GlobalsPINVOKE.OdGiClipBoundary_m_bClippingBack_set(this.swigCPtr, value);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public OdGiClipBoundary() : this(GlobalsPINVOKE.new_OdGiClipBoundary(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;
	}
}
